<?php
require_once("./php/exam.php");
?>

<script src="<?=$SITE_PATH?>/js/ajax.js" type="text/javascript"></script>

<script>
function checkAnswer(val){
	if(val == 'sp'){
		return true;
	}else{
		var cw =document.getElementsByName("answer");
		var cw_check = 0;
		var checkedValue = 0;
		for (var i = 0; i < cw.length; i++)	{
			if(cw[i].checked){
				checkedValue = cw[i].value;
				cw_check = 1;
			}
		}
		if(cw_check == 1){}else{ 
			alert ("- Please choose one answer \n");
			return false
		}
		return checkedValue;
	}
}

function getExamQuestions(val){
	var checkedValue;
	if(checkedValue = checkAnswer(val)){
		var strSubmit='';
		var varp = 0;
		if(val == 'sp'){varp= 'sp';}
		if(val == 'fp'){varp = 'fp';}
		var strSubmit ="answer="+checkedValue+"&sp="+varp;
		//alert(strSubmit);
		var strURL ="getEq.php";
		var strResultFunc = "displayResult";
		xmlhttpPost(strURL, strSubmit, strResultFunc);
		return false;
	}else{
		return false;
	}
}

function displayResult(strIn){
	document.getElementById('questionContainer').innerHTML=strIn;
}
</script>

<?php require_once("header.inc.php"); ?>
<table width="100%"  cellspacing="0" cellpadding="0">
          <tr>
            
            <td valign="top"><table width="100%"  cellspacing="0" cellpadding="0">
              <tr>
                <td valign="middle" class="title-bar"><table width="98%" align="center" cellpadding="0"  cellspacing="0">
                  <tr>
                    <td width="30"><img src="images/icon4.gif" width="21" height="21"></td>
                    <td class="heading-bold2">IMPORTANT INFORMATION </td>
                  </tr>
                </table></td>
              </tr>
              
              <tr>
                <td valign="top">
				<form name="frm" action="" method="post" >
				<table width="96%" align="center" cellpadding="0"  cellspacing="0">
                  
                  <tr>
                    <td>&nbsp;</td>
                    </tr>
                  <tr>
                    <td>
					
					<script language="JavaScript" type="text/javascript" src="<?=$SITE_PATH?>/js/jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="<?=$SITE_PATH?>/js/jscounter.js"></script>

<table width="96%" align="center" cellpadding="0"  cellspacing="0">
                      <tr>
                        <td class="box-lft-corner2"></td>
                        <td class="box-top2"></td>
                        <td class="box-rgt-corner"></td>
                      </tr>
                      <tr>
                        <td valign="top" class="innerbox-left2"><table width="100%"  cellspacing="0" cellpadding="0">
                          <tr>
                            <td class="innerbox-left"></td>
                            </tr>
                        </table></td>
                        <td valign="top" bgcolor="#EBEBEB" class="box-mdl-bk2"><table width="100%"  cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="20px">&nbsp;</td>
                          </tr>
						  <tr>
                            <td height="20px">
							
								<table width="95%" align="center" cellpadding="5" cellspacing="0" >
                              <tr>
							  	<td class="heading-ques" align="left">Questions</td>
								<td class="heading-ques" align="right">
	
	
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="right" class="heading-ques">Time Remaining&nbsp;</td>
        <td class="heading-ques"><div id="test4" align="right"></div></td>
      </tr>
    </table>
	
	<script language="JavaScript">
var counter4 = new JSCounter.TimeCounter("test4", {
		initHour:0, initMinute:30, initSecond:00, increase:false
	
	});	
	counter4.render();
	counter4.run();</script>
	</td>
							  </tr></table>
							
							</td>
                          </tr>
                          <tr>
                            <td valign="top" id="questionContainer"><?php require_once("getEq.php");?><br></td>
                          </tr>
                          <tr>
                            <td></td>
                          </tr>
                        </table></td>
                        <td valign="top" class="innerbox-right2"><table width="100%"  cellspacing="0" cellpadding="0">
                          <tr>
                            <td class="innerbox-right"></td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td class="box-btmlft-corner">&nbsp;</td>
                        <td class="box-btm-rpt">&nbsp;</td>
                        <td class="box-btmrgt-corner">&nbsp;</td>
                      </tr>
                    </table>

					
					</td>
                    </tr>
                </table>
				</form>
				</td>
              </tr>
              <tr>
                <td valign="top">&nbsp;</td>
              </tr>
              
            </table></td>
          </tr>
        </table>
<?php require_once("footer.inc.php"); ?>